.class public Lcom/zuiapps/library/ui/UpgradeDialog;
.super Landroid/app/Activity;
.source "UpgradeDialog.java"


# static fields
.field public static final MDDEL:Ljava/lang/String; = "model"

.field private static final TAG:Ljava/lang/String; = "UpgradeDialog"


# instance fields
.field private final MAX_HEIGHT:F

.field private mHandler:Landroid/os/Handler;

.field private mModel:Lcom/zuiapps/library/model/UpgradeModel;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 34
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 38
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mHandler:Landroid/os/Handler;

    .line 39
    const/high16 v0, 0x437a0000

    iput v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->MAX_HEIGHT:F

    return-void
.end method

.method static synthetic access$000(Lcom/zuiapps/library/ui/UpgradeDialog;)Lcom/zuiapps/library/model/UpgradeModel;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/library/ui/UpgradeDialog;

    .prologue
    .line 34
    iget-object v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    return-object v0
.end method

.method static synthetic access$100(Lcom/zuiapps/library/ui/UpgradeDialog;)Landroid/os/Handler;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/library/ui/UpgradeDialog;

    .prologue
    .line 34
    iget-object v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mHandler:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$200(Lcom/zuiapps/library/ui/UpgradeDialog;Landroid/content/Context;)Ljava/lang/String;
    .registers 3
    .param p0, "x0"    # Lcom/zuiapps/library/ui/UpgradeDialog;
    .param p1, "x1"    # Landroid/content/Context;

    .prologue
    .line 34
    invoke-direct {p0, p1}, Lcom/zuiapps/library/ui/UpgradeDialog;->getAppName(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private getAppName(Landroid/content/Context;)Ljava/lang/String;
    .registers 4
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 130
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;

    move-result-object v0

    invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/content/pm/ApplicationInfo;->loadLabel(Landroid/content/pm/PackageManager;)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method protected applyDimension(F)F
    .registers 4
    .param p1, "value"    # F

    .prologue
    .line 126
    const/4 v0, 0x1

    invoke-virtual {p0}, Lcom/zuiapps/library/ui/UpgradeDialog;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    invoke-static {v0, p1, v1}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v0

    return v0
.end method

.method public finish()V
    .registers 2

    .prologue
    const/4 v0, 0x0

    .line 142
    invoke-super {p0}, Landroid/app/Activity;->finish()V

    .line 143
    invoke-virtual {p0, v0, v0}, Lcom/zuiapps/library/ui/UpgradeDialog;->overridePendingTransition(II)V

    .line 144
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 11
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    const/4 v8, 0x0

    .line 43
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 44
    sget v6, Lcom/zuiapps/library/upgrade/R$layout;->zuiapps_upgrade_sdk_dialog_upgrade:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->setContentView(I)V

    .line 45
    invoke-virtual {p0}, Lcom/zuiapps/library/ui/UpgradeDialog;->getIntent()Landroid/content/Intent;

    move-result-object v6

    const-string v7, "model"

    invoke-virtual {v6, v7}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v6

    check-cast v6, Lcom/zuiapps/library/model/UpgradeModel;

    iput-object v6, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    .line 46
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->txt_msg:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    .line 47
    .local v2, "descText":Landroid/widget/TextView;
    invoke-static {}, Landroid/text/method/ScrollingMovementMethod;->getInstance()Landroid/text/method/MovementMethod;

    move-result-object v6

    invoke-virtual {v2, v6}, Landroid/widget/TextView;->setMovementMethod(Landroid/text/method/MovementMethod;)V

    .line 48
    iget-object v6, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    iget-object v6, v6, Lcom/zuiapps/library/model/UpgradeModel;->desc:Ljava/lang/String;

    invoke-static {v6}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v6

    invoke-virtual {v2, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 49
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->btn_cancel:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 50
    .local v1, "cancelText":Landroid/widget/TextView;
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->btn_confirm:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/TextView;

    .line 51
    .local v5, "sureText":Landroid/widget/TextView;
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->btn_btn_cancel_ripple_view:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/zuiapps/library/view/RippleView;

    .line 52
    .local v0, "cancelRipple":Lcom/zuiapps/library/view/RippleView;
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->btn_confirm_ripple_view:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Lcom/zuiapps/library/view/RippleView;

    .line 53
    .local v4, "sureRipple":Lcom/zuiapps/library/view/RippleView;
    iget-object v6, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    iget-object v6, v6, Lcom/zuiapps/library/model/UpgradeModel;->upgradeType:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    sget-object v7, Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;->FORCE:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    if-ne v6, v7, :cond_8c

    .line 54
    const/16 v6, 0x8

    invoke-virtual {v1, v6}, Landroid/widget/TextView;->setVisibility(I)V

    .line 55
    sget v6, Lcom/zuiapps/library/upgrade/R$string;->zuiapps_upgrade_sdk_force_str:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 65
    :cond_67
    :goto_67
    new-instance v6, Lcom/zuiapps/library/ui/UpgradeDialog$1;

    invoke-direct {v6, p0}, Lcom/zuiapps/library/ui/UpgradeDialog$1;-><init>(Lcom/zuiapps/library/ui/UpgradeDialog;)V

    invoke-virtual {v0, v6}, Lcom/zuiapps/library/view/RippleView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 84
    new-instance v6, Lcom/zuiapps/library/ui/UpgradeDialog$2;

    invoke-direct {v6, p0}, Lcom/zuiapps/library/ui/UpgradeDialog$2;-><init>(Lcom/zuiapps/library/ui/UpgradeDialog;)V

    invoke-virtual {v4, v6}, Lcom/zuiapps/library/view/RippleView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 101
    sget v6, Lcom/zuiapps/library/upgrade/R$id;->txt_scroll:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ScrollView;

    .line 102
    .local v3, "scrollView":Landroid/widget/ScrollView;
    invoke-virtual {v3}, Landroid/widget/ScrollView;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v6

    new-instance v7, Lcom/zuiapps/library/ui/UpgradeDialog$3;

    invoke-direct {v7, p0, v3, v2}, Lcom/zuiapps/library/ui/UpgradeDialog$3;-><init>(Lcom/zuiapps/library/ui/UpgradeDialog;Landroid/widget/ScrollView;Landroid/widget/TextView;)V

    invoke-virtual {v6, v7}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

    .line 123
    return-void

    .line 56
    .end local v3    # "scrollView":Landroid/widget/ScrollView;
    :cond_8c
    iget-object v6, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    iget-object v6, v6, Lcom/zuiapps/library/model/UpgradeModel;->upgradeType:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    sget-object v7, Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;->IGNORE:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    if-ne v6, v7, :cond_aa

    .line 57
    invoke-virtual {v1, v8}, Landroid/widget/TextView;->setVisibility(I)V

    .line 58
    sget v6, Lcom/zuiapps/library/upgrade/R$string;->zuiapps_upgrade_sdk_ignore_str:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v1, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 59
    sget v6, Lcom/zuiapps/library/upgrade/R$string;->zuiapps_upgrade_sdk_sure_str:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_67

    .line 60
    :cond_aa
    iget-object v6, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    iget-object v6, v6, Lcom/zuiapps/library/model/UpgradeModel;->upgradeType:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    sget-object v7, Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;->NEXT:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    if-ne v6, v7, :cond_67

    .line 61
    invoke-virtual {v1, v8}, Landroid/widget/TextView;->setVisibility(I)V

    .line 62
    sget v6, Lcom/zuiapps/library/upgrade/R$string;->zuiapps_upgrade_sdk_cancel_str:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v1, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 63
    sget v6, Lcom/zuiapps/library/upgrade/R$string;->zuiapps_upgrade_sdk_sure_str:I

    invoke-virtual {p0, v6}, Lcom/zuiapps/library/ui/UpgradeDialog;->getString(I)Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_67
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .registers 5
    .param p1, "keyCode"    # I
    .param p2, "event"    # Landroid/view/KeyEvent;

    .prologue
    .line 148
    const/4 v0, 0x4

    if-ne p1, v0, :cond_11

    .line 149
    iget-object v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    if-eqz v0, :cond_11

    iget-object v0, p0, Lcom/zuiapps/library/ui/UpgradeDialog;->mModel:Lcom/zuiapps/library/model/UpgradeModel;

    iget-object v0, v0, Lcom/zuiapps/library/model/UpgradeModel;->upgradeType:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    sget-object v1, Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;->FORCE:Lcom/zuiapps/library/model/UpgradeModel$UpgradeType;

    if-ne v0, v1, :cond_11

    .line 150
    const/4 v0, 0x0

    .line 153
    :goto_10
    return v0

    :cond_11
    invoke-super {p0, p1, p2}, Landroid/app/Activity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_10
.end method

.method public startActivity(Landroid/content/Intent;)V
    .registers 3
    .param p1, "intent"    # Landroid/content/Intent;

    .prologue
    const/4 v0, 0x0

    .line 136
    invoke-super {p0, p1}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    .line 137
    invoke-virtual {p0, v0, v0}, Lcom/zuiapps/library/ui/UpgradeDialog;->overridePendingTransition(II)V

    .line 138
    return-void
.end method
